import 'package:aio/aio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:app/generated/app_strings.dart';
import 'package:app/src/http/bean/wroks/attachment_bean.dart';
import 'package:app/src/http/bean/wroks/contract_bean.dart';
import 'package:app/src/http/bean/wroks/customers_copyInfo.dart';
import 'package:app/src/ui/app_ui.dart';
import 'package:app/src/ui/route/works/public/items/ui_base.dart';
import 'package:app/src/ui/route/works/public/items/ui_card.dart';
import 'package:app/src/utils/image_path_utils.dart';

///单行显示
class UiSingle {
  ///title 标题
  static Widget build(
    BuildContext context,
    String? data,
    String? oldData, {
    String? title = "",
    bool isBlue = false,
    GestureTapCallback? onTap,
  }) {
    if (StringUtils.isEmpty(data)) {
      return AppUi.getEmptyView();
    }
    List<Widget> children = [];
    children.add(UiBase.item(context, title, data, oldData,
        topPadding: 0, isBlue: isBlue, onTap: onTap));
    var column = UiBase.column(context, children);
    var card = UiCard.build(context, column);
    return card;
  }
}
